import { NavBar } from 'antd-mobile'
import React from 'react'
import { useLocation, useNavigate } from 'react-router-dom'

function Details() {
    const navigate=useNavigate();
    const location=useLocation()
    const state=location.state;
    console.log(useLocation)
  return (
    <div>
      <NavBar onBack={()=>navigate(-1)}>列表详情</NavBar>
      <img src={state.img} alt="" style={{width:"100vw", height:"30vh"}}/>
      <span>{state.title}</span>
    </div>
  )
}

export default Details
